package com.xyh.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName student
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "学生信息表")
public class Student implements Serializable {
    /**
     * 
     */
    @ApiModelProperty(value = "学生编号")
    @TableId(type = IdType.AUTO)
    private Integer smpno;

    /**
     * 
     */
    @ApiModelProperty(value = "学生姓名")
    private String sname;

    /**
     * 
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "入学日期")
    private Date sdate;

    /**
     * 
     */
    @ApiModelProperty(value = "班级编号")
    private Integer sno;


    @TableField(exist = false)
    @ApiModelProperty(value = "桥接")
    private Class aClass;

    private static final long serialVersionUID = 1L;


    public Student(String sname, Date sdate, Integer sno) {
        this.sname = sname;
        this.sdate = sdate;
        this.sno = sno;
    }
}